import request from "@/utils/request";

const api = '/financial-domain/'

/**
 * 减免
 * **/
// 滞纳金减免
export async function overdueFineDerate(params) {
    return await request.post(api + 'remission/overdueFineDerate', params)
}

// 减免审批
export async function remissionApproval(params) {
    return await request.post(api + 'remission/remissionApproval', params)
}

// 减免审批
export async function remissionApprovalCause(params) {
    return await request.get(api + 'remission/remissionApprovalCause', {params})
}

// 减免原因
export async function remissionCause(params) {
    return await request.get(api + 'remission/remissionCause', {params})
}

// 减免分页
export async function remissionPageHelper(params) {
    return await request.get(api + 'remission/remissionPageHelper', {params})
}

// 减免导出
export async function remissionExcel(params) {
    return await request.get(api + 'remission/remissionExcel', {params})
}

// 获取减免人
export async function selectRemissionUser(params) {
    return await request.get(api + 'remission/selectRemissionUser', {params})
}

// 减免凭证上传
export async function uploadOverdueCertificate(params) {
    return await request.post(api + 'remission/uploadOverdueCertificate', params)
}

/**
 * 打款
 * **/

// 关闭订单
export async function closeOrder(params) {
    return await request.post(api + 'payment/closeRecord', params)
}

// 线上放款
export async function onLinePaymentAmount(params) {
    return await request.post(api + 'payment/onLinePaymentAmount', params)
}

// 线下放款
export async function paymentAmount(params) {
    return await request.post(api + 'payment/paymentAmount', params)
}

// 打款总金额
export async function paymentAmountTotal(params) {
    return await request.get(api + 'payment/paymentAmountTotal', {params})
}

// 打款列表
export async function paymentList(params) {
    return await request.get(api + 'payment/paymentPageHelper', {params})
}

// 打款列表导出
export async function exportPaymentList(params) {
    return await request.get(api + 'payment/paymentList', {params})
}

/**
 *  溢出
 * **/
//线下还款溢出退款
export async function doReimburse(params) {
    return await request.post(api + 'overflow/doReimburse', params)
}

//线上还款溢出退款
export async function onLineReimburse(params) {
    return await request.post(api + 'overflow/onLineReimburse', params)
}

// 还款溢出导出
export async function overExport(params) {
    return await request.get(api + 'overflow/selectOverflowExport', {params})
}

// 还款溢出列表
export async function selectOverflowList(params) {
    return await request.get(api + 'overflow/selectOverflowPage', {params})
}

// 还款溢出总金额
export async function selectTotalAmount(params) {
    return await request.get(api + 'overflow/selectTotalAmount', {params})
}

/**
 * 还款
 * **/

//线下还款
export async function doRefund(params) {
    return await request.post(api + 'refund/doRefund', params)
}

//线下展期
export async function doRollOver(params) {
    return await request.post(api + 'refund/doRollOver', params)
}

//待还明细
export async function notRefundDetail(params) {
    return await request.get(api + 'refund/notRefundDetail', {params})
}


//还款列表分页查询
export async function fetchRefundList(params) {
    return await request.get(api + 'refund/refundDtoPageHelper', {params})
}

//还款列表总金额查询
export async function refundPageAmount(params) {
    return await request.get(api + 'refund/refundPageAmount', {params})
}

//还款列表展期明细
export async function refundRollOverList(params) {
    return await request.get(api + 'refund/rollOverList', {params})
}

//还款列表优惠券抵扣明细
export async function refundCouponDetails(params) {
    return await request.get(api + 'refund/selectVerificationCoupon', {params})
}

//还款列表获取可用优惠券
export async function fetchAvailableCoupons(params) {
    return await request.get(api + 'refund/availableCoupon', {params})
}

//还款明细
export async function refundDetail(params) {
    return await request.get(api + 'refund/refundDetail', {params})
}

//实收手续费总计
export async function rollDetailTotalAmount(params) {
    return await request.get(api + 'refund/rollDetailTotalAmount', {params})
}

//展期导出
export async function rollOverBillsExport(params) {
    return await request.get(api + 'refund/rollOverBillsExport', {params})
}

//上传展期凭证
export async function uploadRollOverCertificate(params) {
    return await request.post(api + 'refund/rollOverCertificate', params)
}

//展期明细列表导出
export async function selectDetailPageExport(params) {
    return await request.get(api + 'refund/selectDetailPageExport', {params})
}

//展期退回
export async function rollOverBack(params) {
    return await request.post(api + 'refund/rollOverBack', params)
}
//展期明细列表
export async function selectRollDetailPage(params) {
    return await request.get(api + 'refund/selectRollDetailPage', {params})
}

//展期列表
export async function selectRollOverBills(params) {
    return await request.get(api + 'refund/selectRollOverBills', {params})
}

/**
 * 逾期豁免
 * **/
//逾期豁免
export async function addOverdueWaiver(params) {
    return await request.post(api + 'overdueWaiver/addOverdueWaiver', params)
}

//逾期豁免凭证上传
export async function uploadCertificate(params) {
    return await request.post(api + 'overdueWaiver/uploadCertificate', params)
}

//逾期豁免列表导出
export async function waiverExport(params) {
    return await request.get(api + 'overdueWaiver/waiverExport', {params})
}

//逾期豁免列表
export async function waiverPage(params) {
    return await request.get(api + 'overdueWaiver/waiverPage', {params})
}

//逾期豁免总金额
export async function waiverTotalAmount(params) {
    return await request.get(api + 'overdueWaiver/waiverTotalAmount', {params})
}

/**
 * 回款
 * **/

//回款账单导出
export async function refundBillsExport(params) {
    return await request.get(api + 'refund/billsExport', {params})
}

//回款账单列表
export async function refundBillsList(params) {
    return await request.get(api + 'refund/billsPage', {params})
}

//回款账单成功金额
export async function refundBillsSucceed(params) {
    return await request.get(api + 'refund/billsSucceed', {params})
}
// 回款退回
export async function refundBack(params) {
    return await request.post(api + 'refund/refundBack', params)
}

/**
 * 收支明细
 * **/

//收支明细列表
export async function incomeExpensesPage(params) {
    return await request.get(api + 'refund/incomeExpensesPage', {params})
}

//收支明细导出
export async function incomeExpensesExport(params) {
    return await request.get(api + 'refund/incomeExpensesExport', {params})
}

/**
 *  财务报表
 * **/
//订单还款报表
export async function fetchRefundReport(params) {
    return await request.post(api + 'refund/selectRefundReport', params)
}

//金额还款报表
export async function fetchAmountRefundReport(params) {
    return await request.post(api + 'refund/selectAmountRefundReport', params)
}

//还款报表导出
export async function refundReportExport(params) {
    return await request.get(api + 'refund/refundReportExport', {params})
}

/**
 *  财务报表
 * **/
//财务利润表
export async function fetchFinancialProfits(params) {
    return await request.get(api + 'report/financialProfits', {params})
}

//财务利润表导出
export async function financialProfitsExport(params) {
    return await request.get(api + 'report/financialProfitsExport', {params})
}

//财务利润表总数
export async function financialProfitsTotal(params) {
    return await request.get(api + 'report/financialProfitsSummation', {params})
}

//财务利润表获取平均数
export async function financialProfitsMeanValue(params) {
    return await request.get(api + 'report/financialProfitsMeanValue', {params})
}

